package com.soccertgc.comm
{
	public class CallSequenceFailedEvent extends CallSequenceEvent
	{
		
		// -------------------------------------------------------------------------------
		// CONSTANTS
		// -------------------------------------------------------------------------------
		
		public static const		FAILED:String				= "sequence_failed";
		
		// -------------------------------------------------------------------------------
		// FIELDS
		// -------------------------------------------------------------------------------
		
		private var _call:Call;
		private var _cancelled:Boolean;
		
		// -------------------------------------------------------------------------------
		// CONSTRUCTOR
		// -------------------------------------------------------------------------------
		
		public function CallSequenceFailedEvent(sequence:CallSequence, cancelled:Boolean, executedCall:Call)
		{
			// ancestor constructor
			super(FAILED, sequence);
			// Initialization
			_call = executedCall;
			_cancelled = cancelled;
		}
		
		// -------------------------------------------------------------------------------
		// PROPERTIES
		// -------------------------------------------------------------------------------
		
		public function get call():Call
		{
			return _call;
		}
		
		public function get hasCall():Boolean
		{
			return _call != null;
		}

		public function get cancelled():Boolean
		{
			return _cancelled;
		}


	}
}